/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tutorial.MVC.View;

import tutorial.MVC.Model.Pizza;

/**
 *  Chelnerul are roll de View, el este cel care itzi aduce Pizza, dar nu stie 
 * cum se face.
 * @author Boogie
 */
public class Chelner extends javax.swing.JPanel {

    /**
     * Creates new form Chelner
     */
    public Chelner() {
        initComponents();
    }

    public void setPizza(Pizza p){
        this.labelCrust.setText(p.getCrust());
        this.labelSouce.setText(p.getSouce());
        this.labelTopping.setText(p.getTopping());
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        labelSouce = new javax.swing.JLabel();
        labelCrust = new javax.swing.JLabel();
        labelTopping = new javax.swing.JLabel();

        setBorder(javax.swing.BorderFactory.createTitledBorder("Chelner"));

        jLabel1.setText("Topping:");

        jLabel2.setText("Souce:");

        jLabel3.setText("Crust:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelTopping)
                    .addComponent(labelSouce)
                    .addComponent(labelCrust))
                .addContainerGap(108, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(labelTopping)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(labelSouce)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(labelCrust))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel3)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel labelCrust;
    private javax.swing.JLabel labelSouce;
    private javax.swing.JLabel labelTopping;
    // End of variables declaration//GEN-END:variables
}
